import { Inventory } from './goods'

export namespace Procure {
  export interface Warehouse {
    address: string
    contacts: string
    mobile: string
    amount: number
    orderAmount: number
    checkFlag: boolean
    checkTime: string | null
    checkerId: number | null
    corpId: number
    storeId: number
    createTime: string
    date: string | null
    modifyTime: string | null
    id: number
    itemCount: number
    orderNo: string
    orderType: number | null
    printStatus: boolean
    purchase: any | null
    remark: string
    returnType: number
    sourceId: number | null
    sourceNo: string
    status: number
    houseList: unknown | null
    stockindetailList: unknown | null
    submitterId: number | null
    submitterName: string
    supplierId: number | null
    supplierName: string
  }

  export interface RejectionDetail {
    address: string
    contacts: string
    mobile: string
    amount?: number | null
    orderAmount?: number
    checkFlag?: boolean
    checkTime?: string | null
    checkerId?: number | null
    corpId?: number
    storeId?: number
    createTime?: string
    date?: string
    modifyTime?: string | null
    id: number
    itemCount?: number
    orderNo?: string
    orderType?: number
    printStatus?: boolean
    purchase?: unknown | null
    remark: string
    returnType?: number
    sourceId?: number
    sourceNo?: string | null
    status: number
    houseList?: unknown | null
    stockindetailList: Inventory.ResGoodsList[]
    submitterId?: number | null
    submitterName?: string | null
    supplierId: number
    supplierName: string
    productsId?: number
    goodsName?: string
    reasonId?: number
    stockFlag?: number
  }

  export interface Rejection {
    address: string
    contacts: string
    mobile: string

    amount: number
    orderAmount: number

    checkFlag: boolean
    checkTime: string | null
    checkerId: number | null

    corpId: number
    storeId: number

    createTime: string
    date: string | null
    modifyTime: string | null

    id: number
    itemCount: number
    orderNo: string
    orderType: number | null
    printStatus: boolean
    purchase: unknown | null
    remark: string
    returnType: number

    sourceId: number | null
    sourceNo: string

    status: number

    houseList: unknown | null
    stockindetailList: unknown | null

    submitterId: number | null
    submitterName: string

    supplierId: number | null
    supplierName: string
  }
  export interface StoreHouse {
    code: string
    corpId?: number
    createTime?: string
    id: number
    isDefault: boolean
    isDel?: boolean
    name: string
    storeId?: number
    updateTime?: string
  }

  export interface GoodsTotal {
    amount: number
    costPrice: number
    price: number
    barCode: string
    goodsId: number
    houseId: number
    id: number
    productId: number
    storeId: number
    categoryName: string
    goodsName: string
    houseName: string
    unitName: string
    createTime: string
    updateTime: string
    maxQuantity: number
    minQuantity: number
    quantity: number
    corpId: number
  }

  export interface StockStatement {
    balanceQuantity: number
    quantity: number
    barcode: string
    goodsId: number
    houseId: number
    id: number
    productId: number
    sourceId: number
    sourceNo: string
    corpId: number
    storeId: number
    categoryName: string
    goodsName: string
    houseName: string
    productName: string
    typeName: string
    unitName: string
    convert: unknown | null
    createTime: string
    sourceDetailId: number | null
    type: number
  }

  export interface StockPlan {
    checkFlag: boolean
    checkFlagName?: string
    checkTime?: string
    checkerId?: number
    checkerName?: string
    corpId?: number
    houseId: number
    id?: number | string
    inventoryId?: number
    orderId: number | string
    orderNo: string
    storeId?: number
    sysUserId?: number
    houseName?: string
    printStatusName?: string
    sysUserName?: string
    inventoryList?: any
    inventorydetailList?: any
    inventoryplandetailList: any | StockPlanGoodsDetail[]
    isClean: boolean
    planType?: number
    remark: string
    status: number
    createTime?: string
    updateTime?: string
    detailTypeNameType?: any
    detailType: any
  }

  export interface StockPlanGoodsDetail {
    barcode: string
    categoryName: string
    costAmount: number
    costPrice: number
    goodsId: null
    id: number
    name: string
    orderId: number
    planQuantity: number
    price: number
    productName: string
    productsId: number
    profitLossAmount: number
    profitLossQuantity: number
    quantity: number
    realAmount: number
    realQuantity: number
    storeId: number
    unitName: string
  }
  export interface GetStockPlanGoodsList {
    barcode: string
    brandName: any
    categoryName: string
    convert: number
    corpId: number
    costAmount: number
    costPrice: number
    createTime: any
    id: number
    image: any
    isDefalut: boolean
    isMarketable: boolean
    mallPrice: any
    name: string
    number: any
    planQuantity: number
    plu: any
    posPrice: number
    productName: string
    productPriceId: number
    productsId: number
    purPrice: number
    rmoPrice: number
    specName: string
    storeId: number
    unitName: string
    vipPrice: any
  }

  export interface StockRealSheet {
    amount?: number
    checkFlag?: boolean
    checkFlagName?: string
    checkTime?: any
    checkerId?: number
    checkerName?: any
    corpId?: any
    createTime: string
    dateType?: any
    houseId: number
    houseName?: string
    inventorydetailList: Inventory.CheckGoodsList[]
    orderId?: number
    orderNo?: string
    planOrderId?: any
    planOrderNo?: any
    printStatus?: boolean
    printStatusName?: string
    quantity?: number
    range?: any
    remark: any
    storeId?: any
    sysUserId?: number
    sysUserName?: string
    updateTime?: any
  }

  export interface BreakageSheet {
    address: string
    checkFlag: boolean
    checkFlagName: string
    checkTime: string
    checkerId: number
    contacts: string
    corpId: number
    createTime: string
    customerId: number
    customerName: string
    departmentId: number
    departmentName: string
    houseId: number
    houseName: string
    houseStaffId: any
    id: number
    logisticsId: any
    logisticsName: any
    mobile: any
    modifyTime: any
    orderAmount: number
    orderNo: string
    outDate: string
    remark: string
    staffId: number
    staffName: string
    stockoutdetailList: any
    storeId: number
    submitterId: number
    submitterName: string
    trackingNo: string
    type: number
  }

  export interface BreakageSheetDetail {
    amount?: number | string
    barcode?: string
    categoryName?: string
    convert?: number
    costPrice?: number
    customerId?: number
    goodsId?: number
    goodsName?: string
    houseName?: any
    id?: number
    orderId?: number
    orderNo?: any
    outDate?: any
    planQuantity?: number
    price?: number
    productName?: string
    productsId?: number
    quantity?: number
    remark?: string
    storeId?: number
    unitName?: string
    taxRate?: number
    isGift?: boolean
    giftQuantity?: number
  }

  export interface BreakageSheetOrderInfo {
    id: number
    type: number
    orderNo: string
    outDate: string
    trackingNo: string
    status: number
    checkFlag: boolean
    remark: string
    printStatus: number
    stockoutdetailList: BreakageSheetDetail[]
    houseId: number
    departmentId: number
    staffId: number
    houseStaffId: any
    address?: any
    checkFlagName?: any
    checkTime?: any
    checkerId?: any
    contacts?: any
    corpId?: number
    createTime?: string
    customerId?: any
    customerName?: any
    departmentName?: any
    houseName?: any
    logisticsId?: any
    logisticsName?: any
    mobile?: any
    modifyTime?: any
    orderAmount?: number
    staffName?: any
    storeId?: number
    submitterId?: number
    submitterName?: any
    orderType?: number
    supplierId?: number
    sourceId?: number
  }

  export interface BreakageResult {
    address?: string
    alias?: string
    commTypeId: number
    commTypeName?: string
    contact?: any
    corpId?: number
    createTime?: string
    customeCode: string
    id: number
    isDelete?: boolean
    mobile?: any
    name: string
    status: number
    storeId?: number
    tag?: any
    updateTime?: string
  }
  export interface ProcureSheet {
    bank: any
    bankAccount: any
    businessLicense: any
    businessType: number
    businessTypeName: any
    checkOutCycle: number
    commissionRate: number
    contact: string
    contactAddress: any
    corpId: number
    createTime: string
    helpCode: string
    id: number
    isDelete: boolean
    mobile: string
    monCheckCyclse: number
    name: string
    regionId: number
    regionName: any
    settleType: number
    settleTypeName: any
    storeId: number
    supplierCode: string
    taxCode: any
    updateTime: any
    orderNo: string
    waitDeliveryQuantity?: number // 期待收货数量
    waitGiftReturnQuantity?: number // 可退换礼品数量
    waitReturnQuantity?: number // 可退换数量
  }
  export interface ProcureSheetDetail {
    amount?: number
    attachment?: any
    checkFlag?: boolean
    checkTime?: any
    checkerUserId?: any
    corpId?: number
    createTime?: string
    deliveryStatus?: number
    deliveryStatusName?: string
    goodNames?: string
    itemCount?: number
    orderAmount?: number
    printStatus?: boolean
    storeId?: number
    submitterId?: number
    submitterName?: null
    supplierList?: null
    supplierName?: string
    address: string
    purchaseDetailList: Inventory.ResGoodsList[]
    remark: string
    mobile: string
    contacts: string
    id: number
    deliveryDate: string
    orderDate: string
    supplierId: number
    orderNo: string
    date?: string
  }
  export interface ProcureWarehouseTotalDetail {
    id: number
    quantity: number //收货数量
    price: number //收货单价
    amount: number //收货金额
    giftQuantity: number //赠品数量
    remark: string //备注
    convert: number //换算率
    lastInvoicePrice: number //最近进价
    basicQuantity: number //基本数量
    basePrice: number //基本单价
    returnQuantity: number
    giftReturnQuantity: number
    unitName: string //采购单位
    defaultUnit: string //基本单位
    goodsName: string //商品名称
    categoryName: string //商品分类
    spesDesc: string //商品规格
    date: string //收货日期
    orderNo: string //单据编号
    sn: string //商品代码
    checkFlagName: string
    supplierName: string //供应商名称
    createTime: string //制单时间
    checkTime: string //审核时间

    barcode: string | any
    corpId: number | any
    documentType: number | any
    goodsId: number | any
    houseId: number | any
    houseName: any
    isDefault: boolean | any
    isGift: boolean | any
    ispart: any
    orderId: number | any
    orderTypeName: any
    posPrice: number | any
    productName: any
    productsId: number | any
    sourceDetailId: any
    sourceId: any
    stockCount: any
    stockUnit: any
    storeId: number | any
    taxRate: number | any
    totalDeliveryQuantity: number | any
    totalReturnQuantity: number | any
    unitBasis: number | any
    waitGiftReturnQuantity: number | any
    waitReturnQuantity: number | any
  }
  export interface AdjustmentReason {
    content: string
    corpId: number
    id: number
    isDelete: boolean
    modifyTime: number
    remark: string
    resonType: number
    stockFlag: number
    storeId: number
    type: number
    reasonType: number
  }
}
